<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Title</title>
  <style>
    *{
      padding:0;
      margin: 0;
    }
    html,body{
      height: 100%;
    }
    #mask{
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      text-align: center;
      font-size: 30px;
      background:rgba(1,1,1,0.5);
    }
    #mask h3{
      color:red;
    }
    #mask button{
      padding:5px
    }
  </style>
</head>
<body>
<a href="https://baidu.com"><img style="width:100%" src="img/1.jpg" alt=""></a>
<div id="mask">
  <h3>恭喜您， 中奖啦</h3>
  <button>关闭</button>
</div>
</body>
<script>
  // 通过去除默认行为
  const btn = document.querySelector("button");
  const mask = document.querySelector("#mask");
  btn.addEventListener("touchstart",function(e){
    mask.style.display = "none";
    e.preventDefault();
  })
</script>
</html>